/**
 * 扫码
 */
export function scanCode() {
	return new Promise(resolve => {
		wx.scanCode({
			success: (res) => {
				console.log("scanCode:ok", res);
				resolve(res.result)
			},
			fail: (err) => {
				console.log("scanCode:err", err);
				resolve({
					errno: err.errno || 10000,
					errMsg: err.errMsg
				})
			}
		});
	})
}
